Integrand size = 28, antiderivative size = 105 \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{\sqrt {a} d}+\frac {1}{d \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}} \]
[Out]
Time = 0.41 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {4326, 3629, 3627, 3625, 211} \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d}+\frac {1}{d \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}} \]
[In]
[Out]
Rule 211
Rule 3625
Rule 3627
Rule 3629
Rule 4326
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx \\ & = \frac {2}{d \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}+\left (i \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx \\ & = \frac {1}{d \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}+\frac {\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx}{2 a} \\ & = \frac {1}{d \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}}-\frac {\left (i a \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d} \\ & = \frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{\sqrt {a} d}+\frac {1}{d \sqrt {\cot (c+d x)} \sqrt {a+i a \tan (c+d x)}} \\ \end{align*}
Time = 0.71 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.92 \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {i a \tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {i a \tan (c+d x)}}+\frac {2}{\sqrt {a+i a \tan (c+d x)}}}{2 d \sqrt {\cot (c+d x)}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (83 ) = 166\).
Time = 38.92 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.92
method | result | size |
default | \(\frac {\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (\sqrt {\cot }\left (d x +c \right )\right ) \left (i \tan \left (d x +c \right ) \sqrt {2}\, \arctan \left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}\right )+i \tan \left (d x +c \right ) \sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}+\sqrt {2}\, \arctan \left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}\right )-\sec \left (d x +c \right ) \sqrt {2}\, \arctan \left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}\right )-\tan \left (d x +c \right ) \sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\right )}{d \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}}\) | \(202\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (77) = 154\).
Time = 0.28 (sec) , antiderivative size = 333, normalized size of antiderivative = 3.17 \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=-\frac {{\left (a d \sqrt {-\frac {2 i}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (-2 \, {\left (\sqrt {2} {\left (i \, a d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {-\frac {2 i}{a d^{2}}} - 2 i \, a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - a d \sqrt {-\frac {2 i}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (-2 \, {\left (\sqrt {2} {\left (-i \, a d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {-\frac {2 i}{a d^{2}}} - 2 i \, a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 2 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} {\left (i \, e^{\left (2 i \, d x + 2 i \, c\right )} - i\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, a d} \]
[In]
[Out]
\[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {\sqrt {\cot {\left (c + d x \right )}}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int { \frac {\sqrt {\cot \left (d x + c\right )}}{\sqrt {i \, a \tan \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int { \frac {\sqrt {\cot \left (d x + c\right )}}{\sqrt {i \, a \tan \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {\sqrt {\mathrm {cot}\left (c+d\,x\right )}}{\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \]
[In]
[Out]